﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Frame.Lib.Core.Base;

namespace Jzy.DAL.Account
{
    public class AccountDAL : BaseDAL
    {


        public decimal SumOut(string where,params object[] paras)
        {
            string sql = "select isnull(sum(amount),0) from " + OTableName.Account + " where IsIncome = 0 and " + where;

            return dbOper.GetScalar<decimal>(sql, paras);


        }

        public decimal SumIncome(string where,params object[] paras)
        {
            string sql = "select isnull(sum(amount),0) from " + OTableName.Account + " where IsIncome = 1 and " + where;

            return dbOper.GetScalar<decimal>(sql, paras);
        }
    }


}
